﻿using Unity.Entities;
using UnityEngine;


public class PoolEnemyAuthoring : MonoBehaviour
{
    public int EnemyInitialSize;
    public int EnemyExpansionSize;

    public class Baker : Baker<PoolEnemyAuthoring>
    {
        public override void Bake(PoolEnemyAuthoring authoring)
        {
            var entity = GetEntity(TransformUsageFlags.None);
            AddComponent<PoolEnemyTag>(entity);
            AddComponent(entity, new PoolConfig
            {
                InitialSize = authoring.EnemyInitialSize,
                ExpansionSize = authoring.EnemyExpansionSize
            });

            AddBuffer<PoolElement>(entity);
        }
    }
}

